package inspect;

import org.springframework.beans.factory.BeanFactory;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * Created by Shirly on 2016/8/18.
 */
public class AspectJTestClient {
    /**
     * @param args
     */
    public static void main(String[] args) {
        BeanFactory factory = new ClassPathXmlApplicationContext("classpath:mvc-dispatcher-servlet.xml");

        StockService stockService = factory.getBean(StockService.class);
        FundService fundService = factory.getBean(FundService.class);

        stockService.getBaseInfo("1");
        fundService.getBaseInfo("2");

        //cannot be intercepted
        new StockService().getBaseInfo("3");
    }
}
